<?php
if($_POST)
{
	$title = trim(strip_tags($_POST['title']));
	$descp = trim(strip_tags($_POST['descp']));
	$cts = explode("\n",strip_tags($_POST['content'],'<img>'));
	foreach($cts as $val)
	{
		$content .= trim($val)?'<p>'.trim($val).'</p>':'';
	}
	$data = array(
		'title' => $title,
		'description' => $descp,
		'content' => $content,
		'catename' => '社会热点',
		'cates'=>1,
		'author'=>$u['nickname']?$u['nickname']:'37.5°',
		'author_id'=>$u['id'],
		'addtime'=>time()
	);
	$_->articles->_insert($data) ? _redirect('提交成功！', '/index.php?p=mblogs'):'';exit;
}
?>